#pragma once

namespace solution_070
{

class Solution
{
public:
    int climbStairs(int n)
    {
        if (n == 1)
            return 1;
        if (n == 2)
            return 2;
        int step_minus_2 = 1;
        int step_minus_1 = 2;
        for (int i = 3; i <= n; ++i) {
            int step = step_minus_2 + step_minus_1;
            step_minus_2 = step_minus_1;
            step_minus_1 = step;
        }
        return step_minus_1;
    }
};

}  /* namespace solution_070 */
